package com.css.bjdt_core.report.entity;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;

import lombok.Data;

//表条件实体定义
@Data
@Table("RPT_TEMPLATE_CONDITION")
public class RptTemplateCondition {
	//条件ID
	@Name
	@Column("CONDITION_ID")
	private String conditionId;
	//绝对行号
	@Column("ABS_ROW_NUM")
	private String absRowNum;
	//绝对列号
	@Column("ABS_COL_NUM")
	private String absColNum;
	//相对行号
	@Column("REL_ROW_NUM")
	private String relRowNum;
	//相对列号
	@Column("REL_COL_NUM")
	private String relColNum;
	//是否有括号(0:没括号，1：有括号)
	@Column("COMBO_TYPE")
	private String comboType;
	//信息集ID
	@Column("SET_ID")
	private String setId;
	//信息项ID
	@Column("ITEM_ID")
	private String itemId;
	//条件值
	@Column("CONDITION_VALUE")
	private String conditionVal;
	//逻辑操作符(并且/或者)
	@Column("LOGIC_OPERATOR")
	private String logicOperator;
	//关系操作符(大于、等于、小于类的)
	@Column("RELA_OPERATOR")
	private String relaOperator;
	//条件类型(1总控2行3列4单元格5其他)
	@Column("CONDITION_TYPE")
	private String conditionType;
	//子表ID
	@Column("TEMPLATE_ID")
	private String templateId;
	//排序ID
	@Column("ORDER_ID")
	private Integer orderId;
	@Column("AREA_TEMPORARY_ID")
	private String areaTemporaryId;

	public enum ConditionType {
		//总控条件
		total("1"),
		//行条件
		row("2"),
		//列条件
		col("3"),
		//单元格条件
		cell("4"),
		//其他
		other("5");

		private String key;

		ConditionType(String key) {
			this.key = key;
		}

		public String getKey() {
			return key;
		}
	}

	//列数
	private String colLetter;
}
